package additional;

import javax.vecmath.Vector2d;

import ogl.vecmath.Color;
import ogl.vecmath.Vector;

import static ogl.vecmathimp.FactoryDefault.vecmath;

public class Vertex {
	private Vector position;
	private Color color;
	private Vector normal;
	private Vector2d texture;

	public Vertex(Vector p, Color c) {
		setPosition(p);
		setColor(c);
	}

	public Vertex(Vector p, Color c, Vector2d t) {
		position = p;
		color = c;
		texture = t;
	}

	public Vertex(Vector p, Color c, Vector n, Vector2d t) {
		position = p;
		color = c;
		normal = n;
		texture = t;
	}
	
	public Vertex(Vector p, Vector n, Vector2d t) {
		position = p;
		color = vecmath.color(0.9f,0,0);
		normal = n;
		texture = t;
	}

	public Vector getPosition() {
		return position;
	}

	public void setPosition(Vector position) {
		this.position = position;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public void setNormal(Vector n) {
		this.normal = n;
	}

	public Vector getNormal() {
		return normal;
	}
	
	public void setTexture(Vector2d t) {
		this.texture = t;
	}

	public Vector2d getTexture() {
		return texture;
	}

	@Override
	public String toString() {
		return "[ " + position.toString() + " | " + color.toString() + " ]\n";
	}
}
